Skip to content

Replace deprecated primitive wrapper constructors with valueOf()#3

Closed
trly wants to merge 1 commit into
mainfrom
replace-wrapper-constructors-4cbc3767-2a6d-4e8f-9200-ce6ee97f063c
Closed

Replace deprecated primitive wrapper constructors with valueOf()#3
trly wants to merge 1 commit into
mainfrom
replace-wrapper-constructors-4cbc3767-2a6d-4e8f-9200-ce6ee97f063c

Conversation

@trly

@trly trly commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Replaces deprecated primitive wrapper constructors (new Boolean(...),
new Integer(...), new Long(...), etc.) with the recommended static
factory methods (Boolean.valueOf(...), Integer.valueOf(...),
Long.valueOf(...), ...).

These constructors are deprecated for removal — see JEP 390
and the Boolean(boolean) Javadoc.
The valueOf factory methods return cached instances for common values,
making them more efficient than constructors.

Created by Sourcegraph batch change travis.lyons/4cbc3767-2a6d-4e8f-9200-ce6ee97f063c.

@trly trly marked this pull request as ready for review June 16, 2026 14:12
@trly trly closed this Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant